package com.xbhog.screwdemo.demos;

import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import java.util.List;

@Data
public class Dept {
    @NotBlank(message = "部门编号不能为空")
    private String  deptNo;
    @NotBlank(message = "部门名称不能为空")
    private String  deptName;

    @Valid
    @NotEmpty(message = "部门中的用户列表不能为空")
    private List<User> users;
}